package cn.felord.function.service.impl;

import cn.felord.function.entity.UserInfo;
import cn.felord.function.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Override
    public boolean saveUser(UserInfo userInfo) {
        log.info("saving user: {}",userInfo);
        return true;
    }

    @Override
    public UserInfo getByName(String name) {
        UserInfo userInfo = new UserInfo();
          userInfo.setUsername(name);
          userInfo.setAge(18);
        return userInfo;
    }

    @Override
    public boolean delUser(String name) {
        log.info("deleting user: {}",name);
        return true;
    }

    @Override
    public boolean updateUser(UserInfo userInfo) {
        log.info("updating user: {}",userInfo);
        return true;
    }
}
